import request from '@/util/request.js';

/**
 * @description 登录
 * @param {Object} data
 */
export function getLoginApi(data) {
	return request({
		url: '/driver/login',
		method: 'POST',
		data
	})
}
/**
 * @description 获取验证码
 * @param {Object} data
 */
export function getCaptchaApi(data) {
	return request({
		url: '/common/smsCode',
		method: 'GET',
		data
	})
}
/**
 * @description 查询用户信息
 * @param {Object} data
 */
export function getUserInfoApi(data) {
	return request({
		url: '/driver/getMyData',
		method: 'GET',
		data
	})
}
/**
 * @description 退出登录
 * @param {Object} data
 */
export function logoutApi() {
	return request({
		url: '/driver/logout',
		method: 'GET'
	})
}
/**
 * @description 修改头像
 * @param {Object} data
 */
export function updateDriverInfo(data) {
	return request({
		url: '/driver/updateDriverInfo',
		method: 'POST',
		data
	})
}
export function changePassword(data){
	return request({
		url:'/driver/changePassword',
		method:'POST',
		data
	})
}